<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>购物车</title>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/index.css"/>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/gwc.css"/>
		<script type="text/javascript" src='{{__PUBLIC__}}/jquery-1.7.2.min.js'></script>
		<script type="text/javascript">
			$(function(){
				$('.decrease-disable.fb').click(function() {
					var set=$(this).parents('.qty').children('input').val();
					var sid=$(this).parents('.qty').children('input').attr('sid');
					set=set*1+1;
					var data={
						'sid':sid,
						'num':set
					}
					$(this).parents('.qty').children('input').val(set);
					$.ajax({
						type:"post",
						url:"{{U('edit')}}",
						data:{data:data},
						dataType:'json',
						success:function(phpData){
							
						}
					});
				});
				$('.decrease-disable.fa').click(function() {
					var set=$(this).parents('.qty').children('input').val();
					var sid=$(this).parents('.qty').children('input').attr('sid');
					set=set*1-1;
					if(set==0){
						alert('最小只能为零');
						return ;
					}
					$(this).parents('.qty').children('input').val(set);
					var data={
						'sid':sid,
						'num':set
					}
					$(this).parents('.qty').children('input').val(set);
					$.ajax({
						type:"post",
						url:"{{U('edit')}}",
						data:{data:data},
						dataType:'json',
						success:function(phpData){
							
						}
					});
				});
			})
		</script>
	</head>
	<body>
		<div class="wrapper">
			<div class="header">
				<a class="logo" title="凡客诚品" target="_blank">
                <img alt="凡客诚品" src="{{__PUBLIC__}}/Home/img/vancl-logo.png">
                </a>
                <div class="help-center">
                   <a href="http://help.vancl.com/" target="_blank">帮助中心</a>
                </div>
                <div class="account">
                   <p>您好，<span class="username"></span><a>退出登录</a>|<a>更换用户</a>
                   </p>
                 </div>
			</div>
			<div id="location">        
    			<em style="color: #FFFFFF;">1.我的购物车</em> <span>2.填写核对信息单</span> <span>3.成功提交订单</span>
            </div>
            <div class="content">
            	<div class="cart-top">
            		<p></p>
			        <h2>我的购物车</h2>
			    </div>
			    <div class="tip">
        		<span>温馨提示：</span>1.选购清单中的商品无法保留库存，请您及时结算。2.商品的价格和库存将以订单提交时为准。3.促销活动满减优惠将均摊至商品小计中。
    			</div>
    			<div class="cart">
    				<table cellspacing="0">
			                <thead>
			                    <tr>
			                        <th class="title-white bd-left"> &nbsp;</th>
			                        <th class="bar-title ">
			                            <input id="all-ckb-top" class="track all-products-ckb ckb" name="all-products" value="all-products" data-del-tip="" type="checkbox"><label for="all-ckb-top">全选</label>
			                        </th>
			                        <th class="image">&nbsp;</th>
			                        <th class="name">商品名称</th>
			                        <th class="size">尺寸</th>
			                        <th class="presentpoints" style="display:none"> 积分 </th>
			                        <th class="price">单价</th>
			                        <th class="qty">数量</th>
			                        <th class="discount"> 优惠</th>
			                        <th class="subtotal">小计</th>
			                        <th class="operate ">操作</th>
			                        <th class="title-white bd-right"> &nbsp;</th>
			                    </tr>
			                </thead>
			                <tbody class="vancl-title" style="display:none">
								<tr>
									<td class="white bd-left">&nbsp;</td>
									<td colspan="9" class="vancl-title-bottom">
										<p class="vancl-title-left">
											<input id="vancl-ckb-top" name="vancl-products" value="shippers" type="checkbox"> 以下商品由凡客诚品负责配送
										</p>
										<div class="vancl-title-right pos-r">
											<p>
												您再买<span id="transfer-tip">￥<em>140.00</em></span>即可享免运费，
												<a> 立即凑单</a>
											</p>
										</div>
									</td>
									<td class="white bd-right">
										&nbsp;
									</td>
								</tr>
							</tbody>
							<tbody style="display:none">
							<tr>
								<td class="white bd-left">
									&nbsp;
								</td>
								<td colspan="9">
									<p class="shop-name-left">
										<input id="vancl-ckb-shop-10258" name="products-shop" value="products-shop" shopid="10258" issupplier="False" type="checkbox"> 店铺：
										<a href="http://mall.vancl.com/10258/" target="_blank">VANCL 凡客诚品旗舰店</a>
									</p>
								</td>
								<td class="white bd-right">
									&nbsp;
								</td>
							</tr>
						</tbody>
						{{foreach from="$data['goods']" value="$v" key="$k"}}
						<tbody id="vancl-general-product" name="vancl-general-product">
							<tr class="selected">
								<td class="white bd-left bd-bottom">
									&nbsp;
								</td>
								<td class="bar bd-bottom" rowspan="1">
									<input class="track ckb" name="p-item" data-del-tip="" value="" checked="checked" issupplier="False" shopid="10258" type="checkbox">
								</td>
								<td class="image bd-bottom" rowspan="1">
									<a><img src="{{__PUBLIC__}}/Home/img/g1.jpg"></a>
								</td>
								<td class="name bd-bottom">
									<a>{{$v['name']}}</a>
								</td>
								<td class="size bd-bottom">
									<a target="_blank" title="33">{{$v['size']}}</a>
								</td>
								<td class="price bd-bottom">
									￥{{$v['price']}}
								</td>
								<td class="qty bd-bottom">
									<a href="" class="track decrease-disable fa" name="sp_cart_mycart_decrease" style="background-position: -85px 0px;">减少</a>
									<input name="qty" class="modify-product-qty" value="{{$v['num']}}" maxlength="3" type="text" sid="{{$k}}">
									<a class="decrease-disable fb" href="" name="sp_cart_mycart_increase">增加</a>
								</td>
								<td class="bd-bottom">
									-
								</td>
								<td class="subtotal bd-bottom">
									￥{{$v['num']*$v['price']}}
								</td>
								<td class="operate bd-bottom">
									<a class="del track" name="sp_cart_mycart_del" href="{{U('delete',array('sid'=>$k))}}">
									                                 删除</a>
								</td>
								<td class="white bd-right bd-bottom">
									&nbsp;
								</td>
							</tr>
						</tbody>
						{{endforeach}}
						<tbody>
							<tr>
								<td class="white bd-left table-bottom table-bottom-td">
									&nbsp;
								</td>
								<td colspan="9" class="table-bottom table-bottom-td">
									&nbsp;
								</td>
								<td class="white bd-right table-bottom table-bottom-td">
									&nbsp;
								</td>
							</tr>
						</tbody>
    				</table>
    			</div>
				<div style="top: 0px;" id="bar-summary" class="bar-summary clearfix">
					<div class="bar">
						<input id="all-ckb-bt" name="all-products" value="all-products" class="track all-products-ckb ckb" data-del-tip="" type="checkbox">
						<label for="all-ckb-bt">全选</label>
						<a href="javascript:;" class="batch-del-cart track" name="sp_cart_mycar_batch_clear">
				                        删除</a>
						<span>数量总计：<em>{{$data['total_rows']}}</em>件</span>
						<span><em></em></span>
					</div>
					<div class="summary">
				
						产品金额总计(不含运费)：<span class="amount">￥<em>{{$data['total']}}</em></span>
				
					</div>
					<div class="btn-panel">
						<a href="{{U('index/index')}}" class="go-buy track" name="sp_cart_mycar_goBuy" style="background-position: -160px 0px;">
				                    &lt;&lt;继续购物</a> <a class="checkout track" href="{{U('checkout')}}" id="sp_cart_mycar_goPay" name="sp_cart_mycar_goPay">
				                        去结算&gt;&gt;</a>
					</div>
				</div>
			</div>
		</div>
		<center>
			<div class="footBottom" style="border-top:none;">
					<div class="footBottomTab">
					<p>Copyright 2007 - 2015 vancl.com All Rights Reserved 京ICP证100557号 京公网安备11011502002400号 出版物经营许可证新出发京批字第直110138号</p>
					</div>
				</div>
				<span class="blank20"></span>
				<div class="subFooter">
					<a rel="nofollow" href="https://search.szfw.org/cert/l/CX20111229001302001330" class="redLogo" target="_blank"></a>
					<span class="costumeOrg"></span>
					<a rel="nofollow" href="//www.315online.com.cn/member/315090053.html" class="wsjyBzzx" target="_blank"></a>
					<a rel="nofollow" href="//www.hd315.gov.cn/beian/view.asp?bianhao=010202010081900017" class="vanclMsg" target="_blank"></a>
					
					</div>
				</div>
		</center>
	</body>
</html>
